package com.css.crm.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.css.crm.dao.RegisterSaleProcNbrDao;
import com.css.crm.vo.RegisterSaleProcNbrVo;

/**
 * Implementation for RegisterSaleProcNbrDao
 * 
 * @author ais
 */
public class RegisterSaleProcNbrDaoImpl extends BaseDaoImpl implements RegisterSaleProcNbrDao {

	public RegisterSaleProcNbrDaoImpl() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.RegisterSaleProcNbrDao#getRegisterSaleProcNbrById(com
	 * .css.crm.vo.RegisterSaleProcNbrVo)
	 */
	@Override
	public RegisterSaleProcNbrVo getRegisterSaleProcNbrById(RegisterSaleProcNbrVo vo) {

		SqlSession session = getMyBatisSession();
		return session.selectOne("registerSaleProcNbr.getRegisterSaleProcNbrById", vo);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.RegisterSaleProcNbrDao#deleteRegisterSaleProcNbrById(
	 * com.css.crm.vo.RegisterSaleProcNbrVo)
	 */
	@Override
	public int deleteRegisterSaleProcNbrById(RegisterSaleProcNbrVo vo) {

		SqlSession session = getMyBatisSession();
		return session.delete("registerSaleProcNbr.deleteRegisterSaleProcNbrById", vo);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.RegisterSaleProcNbrDao#insertRegisterSaleProcNbr(com.
	 * css.crm.vo.RegisterSaleProcNbrVo)
	 */
	@Override
	public int insertRegisterSaleProcNbr(RegisterSaleProcNbrVo vo) {

		SqlSession session = getMyBatisSession();
		return session.insert("registerSaleProcNbr.insertRegisterSaleProcNbr", vo);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.RegisterSaleProcNbrDao#updateRegisterSaleProcNbr(com.
	 * css.crm.vo.RegisterSaleProcNbrVo)
	 */
	@Override
	public int updateRegisterSaleProcNbr(RegisterSaleProcNbrVo vo) {

		SqlSession session = getMyBatisSession();
		return session.update("registerSaleProcNbr.updateRegisterSaleProcNbr", vo);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.css.crm.dao.RegisterSaleProcNbrDao#queryRegisterSaleProcNbr(com.css
	 * .crm.vo.RegisterSaleProcNbrVo)
	 */
	@Override
	public List<RegisterSaleProcNbrVo> queryRegisterSaleProcNbr(RegisterSaleProcNbrVo vo) {

		SqlSession session = getMyBatisSession();
		return session.selectList("registerSaleProcNbr.queryRegisterSaleProcNbr", vo);
	}

}
